package com.xbao.service.impl;

import com.xbao.dao.RuleMapper;
import com.xbao.model.vo.RuleVo;
import com.xbao.service.RuleService;
import com.xbao.model.EmpRule;
import com.xbao.model.Rule;
import com.xbao.model.req.RuleReq;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by qingshengzheng on 18/8/29.
 */
@Service
public class RuleServiceImpl implements RuleService {
    @Autowired
    private RuleMapper ruleMapper;

    @Override
    public void addRule(EmpRule ruleReq) {

    }

    @Override
    public List<RuleVo> listRule(RuleReq ruleReq) {
        return ruleMapper.queryRule(ruleReq);
    }

    @Override
    public RuleVo getRule(Long rid) {
        RuleVo vo=ruleMapper.getRule(rid);
        return vo;
    }
}
